<?php

namespace app\common\model;

class ProjectTasks extends BaseModel
{
    protected $name = "project_tasks";

    const  SHIGONGZHONG = 0;  //派单中
    const  DISPATCH  = 1;     //已派单   施工中
    const  WANCHENG = 2;      //待审核
    const  REVIEWED  = 3;       //已完成

    /**
     * 关联商品分类表
     * @return \think\model\relation\HasMany
     */
    public function material()
    {
        $module = self::getCalledModule() ?: 'common';
        return $this->hasMany("app\\{$module}\\model\\Material",'tasks_id','id');
    }
}